<?php

/*
 * Copyright (C) Error: on line 4, column 33 in Templates/Licenses/license-gpl30.txt
  The string doesn't match the expected date/time format. The string to parse was: "7.7.2014". The expected format was: "MMM d, yyyy". CZDP01
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

namespace application\home;

use Exception;

if (!defined('SECURE') or SECURE <> 'XLKDZJRKWOSLCMG') : throw new Exception('Nemáte oprávnění přistupovat k souboru!');
endif;

/**
 * Description of home
 *
 * @author CZDP01
 */

//require './application/home/home_extends.php';

final class home extends \application\common_abstract {
    
    private $data = array();
    private $usedata = false;
    
    public function home() {
        $this->data['title'] = $this->model->title();
        $this->data['header'] = $this->model->header();
        $this->data['navigation'] = $this->model->navigation();
        $this->data['info'] = $this->model->info();
        $this->data['userinfo'] = $this->model->userinfo();
        $this->data['contents'] = $this->model->contents();
        $this->data['aside'] = $this->model->aside();
        $this->data['bside'] = $this->model->bside();
        $this->data['navside'] = $this->model->navside();
        $this->data['footer'] = $this->model->footer();
    }
    
    public function run() {
        $this->{$this->action}();
    }
    
    public function getdata() {
        $this->usedata = true;
        return $this->data;
    }
}
